<?php
class Company_gear extends Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->hasColumn('company_id', 'integer', 20);
        $this->hasColumn('modelis', 'string', 255);
        $this->hasColumn('devname', 'string', 255);
        $this->hasColumn('device_type', 'string', 255);
        $this->hasColumn('ip', 'string', 255);
        $this->hasColumn('check_status', 'string', 255);  
        $this->hasColumn('lst_check', 'date');        
        $this->hasColumn('monitoring_for_jobs', 'integer', 1);
        $this->hasColumn('irenginio_info', 'string', 1000);
    }
    public function setUp()
    {
        $this->actAs('Timestampable');
        $this->hasOne('Alert', array(       
                'local' => 'id',
                'foreign' => 'company_gear_id'
            )
        );
         $this->hasOne('Company', array(
                'local' => 'company_id',
                'foreign' => 'id'
            )
        );
         $this->hasMany('Act_computer', array(
                'local' => 'id',
                'foreign' => 'company_gear_id'
            )
        );
    }

}


